1. Field of the Invention
The present invention relates to a printer, a printing system, a print control method and a storage medium on which is stored a print control program for controlling a printer, and more specifically to a printer that processes received print data to generate image data and to actually print the image data on a recording medium, such as a sheet of paper; a printing system that employs a predetermined communication medium to connect the above described printer and a host computer, which generates print data in accordance with instructions issued by a user; a print control method for the above described printer; a storage medium on which is stored a print control program for controlling the above described printer; and a transmission device for transmitting a control program for controlling the above described printer.
2. Related Background Art
Conventionally, a printing system that is constituted by the host computer and the printer described above is requested not only to permit the printer to print data that are generated by the host computer, but also to obtain information concerning the printer from the host computer and to set the printing environment. Many printing systems that satisfy these requests are presently being produced.
FIG. 23 is a functional block diagram illustrating the arrangement of a conventional printing system that obtains information concerning a printer from a host computer and sets the printing environment. In the conventional printing system, a host computer 2300 and a printer 2350 are interconnected by a specific communication medium 2380.
The host computer 2300 comprises an application unit 2301, a printer driver 2302, an output buffer 2303, an I/F (interface) driver 2304 and a utility unit 2305.
The application unit 2301 provides a graphic user interface for a user, and generates image data that match the purpose of the user. The printer driver 2302 translates image data generated by the application unit 2301 into page description language (hereinafter generally referred to as xe2x80x9cPDLxe2x80x9d) data that can be printed by the printer 2350.
The output buffer 2303 is used to temporarily store the PDL data that are generated by the printer driver 2302. The I/F driver 2304 transmits to the printer 2350 the PDL data that are stored in the output buffer 2303, and exchanges various types of information with the printer 2350 to obtain information for the printer 2350 or to set the printing environment. The utility unit 2305 acquires information concerning the printer 2350 and transmits it to the graphic user interface, or changes a print job or the setup of the printer 2350 in accordance with an instruction issued by a user.
The printer 2350 comprises an I/F driver 2351, an input buffer 2352, a JCL (Job Control Language) parser 2353, a PDL translator 2354, a drawing buffer 2355, a drawing unit 2356, a printer engine 2357, and a database 2358.
The I/F driver 2351 receives PDL data from the host computer 2300, and exchanges information with the host computer to obtain information concerning the printer 2350 or to set the environment. The input buffer 2352 is used to temporally store data received by the I/F driver 2351, and serves as a buffer member for delaying the processing performed at the following stage.
The JCL parser 2353 analyzes the received data, and for assigning the processing, employs a predetermined JCL to determine whether an information acquisition request or an environment setup request for the printer 2350 has been received, or whether PDL data has been received. The PDL translator 2354 translates the PDL data that are assigned by the JCL parser 2353, and converts the PDL data into an adequate drawing object. The database 2358 is used either to store setup contents when the setting up of the environment of the printer 2350 is requested using the JCL, or is used to provide information to the JCL parser 2353 when the acquisition of information is requested in JCL. In addition, at the following stage the database 2358 transmits information to the PDL translator 2354.
Until the actual printing is initiated, the drawing buffer 2355 is used for the temporary storage of the drawing object that is generated by the PDL translator 2354. As part of the drawing process, the drawing unit 2356 changes the drawing object temporarily stored in the drawing buffer 2355 into a bitmapped image and transmits it to the printer engine 2358. After receiving the bitmapped image the printer engine 2358 prints it on a recording medium, such as paper, using a well known printing technique.
An explanation will now be given for the job control language (JCL). First, the means for transmitting a print job using JCL will be described. FIG. 24 is a listing for a print job which shows the structure used for JCL. The same text structure is used for the example in FIG. 25, which is a JCL listing comprising data generated by the printer driver 2302, and PDL data. In FIGS. 24 and 25,  less than ESC greater than  indicates the escape character.
In FIG. 24, row (1) contains a UEL (Universal Exit Language) entry, indicating that the JCL parser 2353 is to begin a parsing process. Row (2) indicates that the process will be shifted to the PDL translator 2354, called xe2x80x9cLIPSxe2x80x9d, for the translation of the PDL data and the performance of a drawing process. Row (3) indicates a plurality of lines of PDL data that are described in LIPS form. Row (4) indicates that the PDL translator 2354 will be halted and the program control shifted to the JCL parser 2353. In the above JCL listing, the printer 2350 appropriately switches a plurality of print jobs to perform printing.
An explanation will now be given for the means, using JCL, for obtaining information concerning a printing device or a print job, or for setting up the environment. In FIG. 25 is shown a list of commands and information that are exchanged in order to obtain information or to set up the environment using JCL.  less than ESC greater than  indicates the escape character, and  less than FF greater than  indicates the form feed character.
In row (1) in FIG. 25, as in row (4) in FIG. 24, it is indicated that the processing by the PDL translator 2354 will be halted and program control shifted to the JCL parser 2353 to initiate a parsing process. Row (2) is a command generated by the utility unit 2305 of the host computer 2300 to acquire from the printer 2350 the initial copy count (COPIES) for the pages that are to be printed by the printer 2350. The character string COPIES is used only as an example, and other information concerning the printer 2350 can be obtained using an appropriate character string. In row (3) is the reply transmitted by the printer 2350 to the host computer 2300 in response to the request in row (2). In this case, xe2x80x9c1xe2x80x9d is transmitted as the initial value for the count of the pages that are to be printed by the printer 2350. In row (4), a final transmission by the printer 2350 to the host computer 2300 signals the end of the reply to the request in row (2). Row (5) is a command generated by the utility unit 2305 of the host computer 2300 and indicates that the initial count value for the pages to be printed by the printer 2350 is reset to xe2x80x9c3xe2x80x9d. With the above JCL statements, the host computer 2300 can obtain information and can set up the environment for the printer 2350.
The above described printing system has been developed over the years, and requests for obtaining information and for setting up the environment are actually more complicated. Specifically, the first function designated is a request for the cancellation of an arbitrary print job input to the printer 2350. And then, the second function requested is that the print data for the print job to be canceled be invalidated even before they have been analyzed, i.e., that print data for the print job to be canceled be invalidated even while they are still stored in the input buffer. And also, the third function requests that for the acquisition of information concerning the printer or the print job, the setup of the environment, and the designation of the print job to be canceled be performed in real time. However, a conventional printing system can not implement these three functions.
One reason that a conventional printing system can not implement the first function will now be described. As is apparent from the structure of the printer 2350, print data, including PDL data, must be translated before the JCL parser 2353 recognizes a print job. Therefore, the print data are temporarily stored in the input buffer 2352 before they are recognized by the JCL parser 2353. Thus, so long as those print data are stored in the input buffer 2352, they are not actually identified as constituting a print job, so that the printing system can not obtain complete information concerning an arbitrary print job input to the printer 2350 or the setting up of the environment, and for designating a print job to be canceled.
One reason that a conventional printing system can not implement the second function will now be described. Depending on the amount of print data provided for a print job, the processing states may vary for different parts of the print data for the print job, with one part of the data still stored in the input buffer 2352 while another part is being analyzed by the PDL translator 2354. In a conventional printing system, the print data that have not yet been analyzed by the PDL parser 2353 or the PDL translator 2354, e.g., the portion of the print data that are still stored in the input buffer, are not identified as being part of the print data for the print job.
Next, one reason that a conventional printing system can not implement the third function will now be described. Image data generated by the application unit 2301 of the host computer 2300 are converted into PDL data by the printer driver 2302, and the PDL data are transmitted via the output buffer 2303 and the I/F driver 2304 to the printer 2350. Even when information concerning the printer 2350 or the print job is to be acquired, or the environment is to be set up during the transmission of the print data, exclusive-OR control is performed by the I/F driver 2304, and a request by the utility unit 2305 can not be satisfied until the transmission of the print data is completed. Therefore, as concerns the acquisition of information related to the printer 2350 or to the print job, or the cancellation of the print job, deterioration of real time processing occurs.
To resolve these shortcomings, it is one object of the present invention to identify all the print jobs input to a printer and to designate an arbitrary print job to be canceled; to invalidate print data for a print job to be canceled even before the print data have been analyzed, for example, even when the print data are stored in an input buffer; and to cancel a print job in real time.
To achieve the above object, according to the present invention, a printer comprises:
management means for managing print job identification information that is uniquely assigned to an externally input print job for which print data are included; and
print data invalidation means for, among the print data of the print job that corresponds to the print job identification information that is designated, invalidating a portion of the print data that has not yet been analyzed.
Furthermore, to achieve the above object, according to the present invention, the print data invalidation means invalidates the print data that correspond to the print job identification information that is designated and that are stored in a plurality of places, beginning with print data that is nearer to the input stage for the printer.
Further, to achieve the above object, according to the present invention, a printer further comprises:
an input buffer used to store the print data before the print data have been analyzed, and the print data invalidation means invalidates the print data that is stored in the input buffer for the print job that corresponds to the print job identification information that is designated.
In addition, to achieve the above object, according to the present invention, the input buffer is constituted by buffer blocks for the storage of the print job identification information and the print data.
Moreover, to achieve the above object, according to the present invention, the input buffer is constituted by a used buffer block queue of buffer blocks in which the print job identification information and the print data are stored, and an unused buffer block queue of unused buffer blocks. The print data invalidation means extracts, from the used buffer block queue, a buffer block in which is stored print job identification information that matches the print job identification information that is designated, and links the buffer block that is extracted to the unused buffer block queue.
Further, to achieve the above object, according to the present invention, a printer further comprises:
print data analysis means for analyzing the print data. And when the print data analysis means is analyzing the print data for the print job that corresponds to the print job identification information that is designated, the print data invalidation means halts the analyzation.
Furthermore, to achieve the above object, according to the present invention, a printer further comprises print job detection means for, without analyzing the print data for the print job, assigning the print job identification information to the print job.
In addition, to achieve the above object, according to the present invention, the print job detection means, based on control data, analyzes a job packet that is obtained by adding, for the print job that includes print control data, the control data to the print data or to print control data, and detects the print data or the print control data for the print job.
Further, to achieve the above object, according to the present invention, the job packet consists of identification information, which is used to identify the print control data, and the print control data, or consists of the print data and identification information, which is used to identify the print data.
Moreover, to achieve the above object, according to the present invention, a printer further comprises:
print job control means for, upon receiving a print control request, controlling in accordance with a print control command the print job that is specified by the print job identification information that is designated by the print control request.
Furthermore, to achieve the above object, according to the present invention, the print control command is the acquisition or the setup of the print control data that are managed by the print job control means, or the cancellation of the print job.
Moreover, to achieve the above object, according to the present invention, when the print control command is the acquisition of the print control data, the print job control means outputs externally a print control response that includes the print control data.
Further, to achieve the above object, according to the present invention, the printer further comprises: a job channel for the input/output of the job packet and a control channel for the input/output of the print control request or the print control response.
In addition, to achieve the above object, according to the present invention, a printer further comprises logic channel control means, for generating a packet for the job channel for the input/output of the job packet, and the control channel for the input/output of the print control request or the print control response, and for employing the packet for multiplex communication using a single communication medium.
Furthermore, to achieve the above object, according to the present invention, a printer further comprises print job cancellation determination means for determining which print job is to be canceled.
Moreover, to achieve the above object, according to the present invention, the print job cancellation means determines that, of print jobs held by the printer, a print job is to be canceled for which print data are located near an output stage.
Further, to achieve the above object, according to the present invention, the printer further comprises: cancellation instruction detection means for detecting an externally received instruction for cancellation of the print job.
In addition, to achieve the above object, according to the present invention, the printer further comprises:
print job display means for displaying all the print jobs held by the printer; and
print job selection means for selecting a print job to be canceled from among the print jobs displayed by the print job display means.
The same features are included for a printing system, a print control method, a storage medium on which is stored a print control program for controlling a printer, and a transmission device for transmitting a print control program for controlling the printer.